import Layout from '@/layout'
const Login = () => import('@/views/login/Temp2')
const Notfound = () => import('@/views/404')
const CMSAutoCreate = () => import('@/views/card/cms-v2/cms-auto-create')
const CMSAuto = () => import('@/views/card/cms-v2/cms-auto')
const CMSManualOSD = () => import('@/views/card/cms-v2/cms-manual-osd')
const CMSManualSSD = () => import('@/views/card/cms-v2/cms-manual-ssd')
const CMSOutAuto = () => import('@/views/card/cms/cms-out-auto')
const ToGps = () => import('@/views/card/cms-v2/to-gps')
const GateOutOuto = () => import('@/views/card/cms-v2/cms-gate-out-auto')
const GateOutManual = () => import('@/views/card/cms-v2/gate-out-manual')
const WeightingAuto = () => import('@/views/card/cms-v2/weighting-auto')
const CarList = () => import('@/views/card/cms-v2/car-list.vue')
const ManualList = () => import('@/views/card/cms-v2/manual-vehicle-manager.vue')
const VerifyCard = () => import('@/views/card/cms-v2/verify-card.vue')
/**
* hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
* alwaysShow: true               if set true, will always show the root menu, whatever its child routes length
*                                if not set alwaysShow, only more than one route under the children
*                                it will becomes nested mode, otherwise not show the root menu
* redirect: noredirect           if `redirect:noredirect` will no redirect in the breadcrumb
* name:'router-name'             the name is used by <keep-alive> (must set!!!)
* meta : {
    title: 'title'               the name show in submenu and breadcrumb (recommend set)
    icon: 'svg-name'             the icon show in the sidebar,
  }
**/

/**
 * hidden: true                 如果在模板中使用该选项,则不会在侧栏显示该路由(例如：Dashboard),如果是在第一个子路由中使用,侧栏则只显示第一个子路由的名字和图标(例如: Form)
 * alwaysShow: true             如果设置为true它则会始终显示根菜单,无视自路由长度,没有设置的话,就会折叠起来(不清楚为什么没有作用,可能是我写错位置了?)
 * redirect: noredirect         若设置为noredirect则顶部面包屑不能够为其重定向.
 * onlyShowfirst: false         若该设置为true时，将会无视其有多少个孩子路由，只会显示第一个子路由并将其设置为根菜单
 * name:'router-name'           路由名称,此项为必须填写项
 * meta : {
    title: 'title'               这里的名字决定了面包屑和侧栏的名字
    icon: 'svg-name'             当你在svg文件夹内加入了你的图标,那么在这里填写图标名他就会显示在侧栏
  }
 **/
export default [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/login',
    name: 'login',
    meta: { title: 'logon' },
    component: Login,
  },
  {
    path: '/home',
    name: 'Home',
    meta: { title: 'CMSAutoCreate终端' },
    hidden: true,
    component: () => import('@/views/dashboard'),
  },
  { path: '/cms-auto-create', name: 'CMSAutoCreate', meta: { title: 'CMSAutoCreate' }, component: CMSAutoCreate },
  { path: '/cms-auto', name: 'CMSAuto', meta: { title: 'CMSAuto' }, component: CMSAuto },
  { path: '/cms-manual-osd', name: 'CMSManualOSD', meta: { title: 'CMSManualOSD' }, component: CMSManualOSD },
  { path: '/cms-manual-ssd', name: 'CMSManualSSD', meta: { title: 'CMSManualSSD' }, component: CMSManualSSD },
  { path: '/cms-out-auto', name: 'CMSOutAuto', meta: { title: 'CMSOutAuto' }, component: CMSOutAuto },
  { path: '/to-gps', name: 'ToGps', meta: { title: 'ToGps' }, component: ToGps },
  { path: '/gate-out', name: 'GateOutOuto', meta: { title: 'GateOutOuto' }, component: GateOutOuto },
  { path: '/gate-manual', name: 'GateOutManual', meta: { title: 'GateOutManual' }, component: GateOutManual },
  { path: '/weighting-auto', name: 'WeightingAuto', meta: { title: 'WeightingAuto' }, component: WeightingAuto },
  { path: '/car-list', name: 'CarList', meta: { title: 'CarList' }, component: CarList },
  { path: '/manual-list', name: 'ManualList', meta: { title: 'ManualList' }, component: ManualList },
  { path: '/verify-card', name: 'VerifyCard', meta: { title: 'VerifyCard' }, component: VerifyCard },
  {
    path: '/',
    component: Layout,
    redirect: "/dashboard",
    name: "Dashboard",
    hidden: true,
    children: [
      {
        path: 'dashboard',
        name: 'Dashboard',
        component: () => import('@/views/dashboard'),
      },
    ],
  },
  { path: '*', component: Notfound, hidden: true },

  // {
  //   path: "/",
  //   component: Layout,
  //   redirect: "/dashboard",
  //   name: "dashboard",
  //   hidden: true,
  //   children: [
  //     {
  //       path: "dashboard",
  //       name: "dashboard",
  //       component: Login,
  //     },
  //   ],
  // },

  /*   {
    path: "/pcc",
    component: Layout,
    meta: { title: "PCC卡", icon: "form" },
    hidden: true,
    children: [
      {
        path: "pcc",
        name: "pcc",
        component: PCC,
        meta: { title: "PCC卡", icon: "form" },
      },
    ],
  } */
]
